Option Explicit
Sub O_Sample007()
    Dim myWd As VBIDE.Window
    With ThisWorkbook.VBProject.VBE.Windows("Y")
        .Visible = True
        .SetFocus
        SendKeys "^a"
        SendKeys "{DEL}"
    End With
End Sub
